package testJdk.io.other_stream;


import java.io.*;

/**
 * @ClassName : com.io.other_stream.TestOther2
 * @Description : 类描述
 * Created by cyd on 2020-12-22 22:39:57
 */
public class TestOther3 {
    public static void main(String[] args) throws IOException {

        // 将字节流转换为字符流
        InputStream in = System.in; // 字节流
        InputStreamReader inputStreamReader = new InputStreamReader(in); // 转换流
        BufferedReader br = new BufferedReader(inputStreamReader); // 字符流

        PrintWriter pw = new PrintWriter("D:/readme3.txt");

        String str = br.readLine();
        // 停止的条件
        while (!str.equals("bye")) {
            pw.println(str);
            str = br.readLine();
        }

        pw.close();
        br.close();
    }
}
